package com.meizi.daily.rest;

import com.meizi.core.tool.api.R;
import com.meizi.daily.service.MenuService;
import com.meizi.daily.vo.ConsumptionMenuVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author meizi
 * @email enjoymeizi@gmail.com
 * @date 2020/6/11 18:35
 */
@RestController()
@RequestMapping("menu")
public class MenuController {
    @Autowired
    private MenuService menuService;

    @GetMapping("/consumption")
    public R getConsumptionMenu() {
        ConsumptionMenuVo vo = menuService.getConsumMenu();
        return new R().ofSuccess(vo);
    }
}

